﻿using System;

namespace Database.Core.Attributes
{
  /// <summary>
  /// Defines property/column mapping from a data table or data row.
  /// </summary>
  [AttributeUsage(AttributeTargets.Property)]
  public class ColumnName : Attribute
  {
    /// <summary>
    /// Gets the data column name.
    /// </summary>
    /// <value>The nameData column name.</value>
    public string Name
    {
      get;
      private set;
    }

    /// <summary>
    /// Initializes a new instance of the <see cref="ColumnName"/> class.
    /// </summary>
    /// <param name="columnName">Name of the data column.</param>
    public ColumnName(string columnName)
    {
      Name = columnName;
    }
  }
}
